import behaviors from "../../../../../config/behaviors";

Component({
  behaviors: [behaviors],
  properties: {
    product: {
      type: Object,
      value: {},
      observer(newVal, oldVal, changedPath) {
        if (Object.keys(newVal).length > 0 && newVal.skuName && newVal.skuName.length > 0) {
          const skuName = newVal.skuName
          const list = skuName.map(x => x.name)
          this.setData({ list })
        }
      }
    },
    haveSku: false
  },
  data: {
    list: []
  },
  methods: {
  },
  lifetimes: {
  }
});
